home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 4
/
Precision Software Applications Silver Collection Volume 4 (1993).iso
/
database
/
flexbase.exe
/
CHAP3.TXT
< prev
next >
Wrap
Text File
|
1987-07-10
|
16KB
|
209 lines
CREATING A DATABASE
This chapter explains how to create a database. This includes the
procedures for defining each field in the database record as well as its
screen location for entering or accessing data.
HELP
Help assistance is available whenever you need it. Press the F1
function key and context sensitive assistance will be displayed.
TEXT MODE
The F2 function key turns the screen into a 21 line by 80 column
editor so that you can place free text at desired locations on the screen.
Free text is used to create field prompts for the different fields that
will be in your database record.
Press the Esc key to exit the text mode and redisplay the small block
cursor.
Press F1 while in the text mode to open the help window which describes
the various text editing keys.
DEFINE FIELD
Move the small block cursor to the desired location on the screen where
you wish to locate a field, then press F4. A field definition window will
open and you will be prompted for the information that Flexbase needs to
process the data for this field. You will be prompted for:
Field Name - A 1 to 12 character name that identifies
this field.
Field Type - Enter the designator for the type of data
that will be entered and displayed in this
field.
C - Character field.
N - Numeric field.
D - Date field.
Sub Type - Required for date field types.
U - User input only.
S - Date supplied by system.
Length - The desired width of the field. Maximum
field lengths are:
C - 80
N - 15
D - 10 (automatically set)
Decimals - The desired number of decimal places to
display for numeric fields. The decimal
point takes up one position in the field
length, so for a field length of 8 with 2
decimal places, the maximum numeric value
that can be displayed is 99999.99.
Num Format - Numeric fields can be displayed in three
formats:
S - Standard (27384.89)
F - Financial (27,384.89)
C - Currency ($27,384.89)
Upper Case - Forces the data in the field to upper case
characters. Provides standardization for
data entry.
Must Enter - Specifies that the field must be entered
before the record can be saved.
Formula - For character, numeric and user input date
fields, formulas and functions can be entered
on this line. The formula or function will be
used when accessing the database to perform
various mathematical and logical functions. See
Appendix B for a complete listing and formats of
the Flexbase formulas and functions.
SAVE - Move the reverse video cursor over this command
and press Enter to save this field definition.
The field definition can also be saved by
pressing the F10 function key from anywhere in
the field definition window.
If Flexbase detects any errors, a message will
be displayed on the save line that indicates the
most probable cause.
MODIFY FIELD
Once a field has been defined, you can return to that field and make
modifications to the initial field definition. To do this, move the small
block cursor to a position within the width of the field and press F6. The
field definition window will open and the previously defined field
attributes will be displayed. At this point, use the same procedures that
you used to define the field. When finished, use the SAVE or F10 command
to save the modified field definition and close the window.
DELETE FIELD
To delete a previously defined field, position the small block cursor
within the width of the field and press F7. Flexbase will ask you if you
are sure that you want to go ahead with this command. If you do, press Y,
otherwise, press N. Pressing the Esc key in response to this question will
cancel this delete request.
REPOSITION FIELD
Once a field has been defined, you can reposition the field to another
location on the screen. Position the small block cursor within the width
of the field and press F8. The selected field will highlight and any
depression of the cursor control keys will move the field in the desired
direction. When the new screen location is reached, press Enter to end
this command.
Flexbase will check to ensure that the new screen location does not collide
with other fields or free text before the field is permanently repositioned
at the new location. If a collision exists, Flexbase will beep and wait
for you to correct the situation. Press the Esc key to cancel this command
and return the field to its original screen location.
LIST FIELDS
The list fields command will open a window and display the names of all
fields that have been defined up to this point in the create session. The
F10 function key executes this command and the Esc key is used to cancel
this command and close the window. When defining or modifying a field, the
window will automatically close upon exiting each of those commands.
END THE CREATE SESSION
Press F9 to end the current create session. You will be prompted as
to whether you wish to save the work that has been done up to this point.
If you wish to save the database design that you are working on, press Y,
otherwise press N. Pressing the Esc key will return you to the create
session.
If you pressed Y in response to the question to save this session, you
will be advanced to the key field selection process prior to saving this
session to disk and returning to the Flexbase main menu. The key field
selection process is discussed in more detail in the next section.
KEY FIELDS
Flexbase uses key fields to increase the speed when searching for
records in the database and printing reports in a sorted order. Flexbase
allows a maximum of nine key fields for each database, and any of the
three field types (C,N,D) can be selected as a key field.
The select key process begins when you tell Flexbase to save the create
session in response to the F9 command.
Use the cursor control keys to move through the fields in the record
until you have highlighted the field that you wish to use as a key. Press
F7 and you will be asked if duplication will be allowed for this field.
Answer appropriately to the question and continue until you have selected
all of the desired key fields or the maximum number of keys have been
selected.
To remove a field from the key field table, highlight the field and
press F8. To change the type of key tag for a key field, highlight the
desired field and press F7 which will provide you with the opportunity to
specify a different tag.
When all key fields have been selected, press F9 which will save the
create session to disk and return you to the Flexbase main menu.
WARNING TO TWO DISKETTE SYSTEM USERS
When creating a database, place a blank diskette into drive B and
prefix the name of the file with B:.
Do not use the Flexbase system diskette in drive A as a working
diskette. There isn't enough room on it!